@Authors: Lopez Valenzuela Marco Antonio.
@Greatest common divisor of three different numbers.
@Input file: Programa16.s
@Output: GCD


.section	.data
vals:
	.long 3,9,27
.section	.text

.globl _start

_start:
	ldr r3,=vals
	ldr r2,[r3]
	ldr r1,[r3]
	ldr r0,[r3]

gcd:
	cmp r0,r1
	subgt r0,r0,r1
	sublt r1,r1,r0
	bne gcd

	cmp r1,r2
	subgt r1,r1,r2
	sublt r2,r2,r1
	bne gcd

	mov r7, $1
	svc $0

.end
